package com.xiaoq.sites.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Transient;
import com.xiaoq.MongoEntity;

import java.io.Serializable;
import java.util.List;

@Entity(value="sites_point",noClassnameStored=true)
public class SitesPointEntity extends MongoEntity implements Serializable {

	@JsonIgnore
	@Transient
	private static final long serialVersionUID = -3342856025392015056L;

	private String sitesId; // 景区ID
	private String name; // 名称
	private String shortName; //简称
	private Double longitude; // 位置经度
	private Double latitude; // 位置纬度
	private String introduction; // 简介
	private String detailInfo; // 详情
	private String mainImgUrl; // 主图
	private List<String> imgUrls; // 图片列表
	private List<String> tags; // Tag
	private Integer recIndex; // 推荐指数
	private String features; // 特色

	/**
	 *  [longitude, latitude]
	 */
	private double[] loc = new double[2];

	@Transient
	private Integer sortNum;// 序号 对应SitesRoutePointEntity中的 sortNum

	public String getSitesId() {
		return sitesId;
	}

	public void setSitesId(String sitesId) {
		this.sitesId = sitesId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
		if(longitude != null){
			loc[0] = longitude;
		}
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
		if(latitude != null){
			loc[1] = latitude;
		}
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getDetailInfo() {
		return detailInfo;
	}

	public void setDetailInfo(String detailInfo) {
		this.detailInfo = detailInfo;
	}

	public String getMainImgUrl() {
		return mainImgUrl;
	}

	public void setMainImgUrl(String mainImgUrl) {
		this.mainImgUrl = mainImgUrl;
	}

	public List<String> getImgUrls() {
		return imgUrls;
	}

	public void setImgUrls(List<String> imgUrls) {
		this.imgUrls = imgUrls;
	}

	public List<String> getTags() {
		return tags;
	}

	public void setTags(List<String> tags) {
		this.tags = tags;
	}

	public Integer getRecIndex() {
		return recIndex;
	}

	public void setRecIndex(Integer recIndex) {
		this.recIndex = recIndex;
	}

	public String getFeatures() {
		return features;
	}

	public void setFeatures(String features) {
		this.features = features;
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public double[] getLoc() {
		return loc;
	}
}
